﻿using System;
using Oxage.Common;

namespace Oxage.CNC.Models
{
	public interface IMachineCodeTransformer
	{
		/// <summary>
		/// When implemented performs a custom matrix transform for components in the specified code.
		/// </summary>
		/// <param name="code">Code to be transformed.</param>
		/// <param name="matrix">Input matrix that defines transformation (e.g. translating, scaling, rotating)</param>
		/// <returns>Returns a code with transformed components.</returns>
		IMachineCode Transform(IMachineCode code, Matrix matrix);

		/// <summary>
		/// When implemented performs a translation transform for components in the specified code.
		/// </summary>
		/// <param name="code">Code to be transformed.</param>
		/// <param name="vector">Values in vector that define how to scale each component.</param>
		/// <returns>Returns a code with transformed components.</returns>
		IMachineCode Translate(IMachineCode code, Vector3 vector);

		/// <summary>
		/// When implemented performs a scaling transform for components in the specified code.
		/// </summary>
		/// <param name="code">Code to be transformed.</param>
		/// <param name="vector">Values in vector that define how to scale each component.</param>
		/// <returns>Returns a code with transformed components.</returns>
		IMachineCode Scale(IMachineCode code, Vector3 vector);

		/// <summary>
		/// When implemented performs a rotation transform for components in the specified code.
		/// </summary>
		/// <param name="code">Code to be transformed.</param>
		/// <param name="vector">Values in vector that define how to scale each component.</param>
		/// <returns>Returns a code with transformed components.</returns>
		IMachineCode Rotate(IMachineCode code, Vector3 vector);
	}
}
